#include "win_home.hpp"
#include "ui_win_home.h"

WinHome::WinHome(QWidget* parent)
    :WinBase(parent, "home")
    , ui(new Ui::WinHome)
{
    ui->setupUi(this);
    init_page();
}

void WinHome::init_page()
{
    set_pg_container(ui->lay_content);

    pg_user = new PgUser(this);
    pg_conf = new PgConf(this);
    pg_opengl = new PgOpenGL(this);
    
    page_add(ui->btn_menuSideOpenGl, pg_opengl);
    page_add(ui->btn_menuSideCloud, pg_user);
    page_add(ui->btn_menuSideCamera, pg_conf);
    
    page_show(ui->btn_menuSideOpenGl->objectName());
}

WinHome::~WinHome()
{
    delete ui;
}
